<h1>RegisterIndex</h1>

<p>RegisterIndex is used with an Push action to refer to one of the Flash Player's 
internal registers that contains a value to be used in a calculation. The number 
of registers in the Flash Player was increased in Flash 7 to 256.</p>

<table>

<tr>
<th nowrap>Field Name</th>
<th>Type</th>
<th>Size</th>
<th>Description</th>
</tr>

<tr>
<td nowrap valign="top"><a name="ActionType">Type</a></td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">8</td>
<td>Identifies the value when it is encoded. Type = 4.</td>
</tr>

<tr>
<td nowrap valign="top"><a name="ActionLength">register</a></td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">8</td>
<td>The number of the register which will be copied onto the stack.</td>
</tr>

</table>

<p>The Flash Player uses a stack to store values when executing the actions associated 
with a button being  pushed, frame being played, etc. If a value is used repeatedly 
in a calculation, it must be pushed onto the stack each time using an Push action. 
To speed up the execution of the calculation and reduce the amount of code required 
the value can be saved to one of the internal registers of the Flash Player using 
the RegisterCopy action (which copies the value currently at the top of the stack 
into the specified register). An RegisterIndex creates a reference to the register 
so the Flash Player uses the value directly rather than popping it from the stack.</p>

<h2>History</h2>

<p>The RegisterCopy action and access to the Flash Player's internal registers 
was introduced in Flash 5. The number of registers supported was expanded in 
Flash 7 to 256.</p>
